//
//  ClassifyDetailCollectionViewCell.m
//  A段项目,漫画
//
//  Created by dllo on 15/4/23.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "ClassifyDetailCollectionViewCell.h"
#define WIDTH [[UIScreen mainScreen] bounds].size.width
@implementation ClassifyDetailCollectionViewCell

-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        
        
        CGFloat bili1 = 107 / 80.0;
        
        self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0,WIDTH / 4.5 * bili1 + 10, WIDTH / 4.5, 30)];
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        self.titleLabel.numberOfLines = 0;
        [self.contentView addSubview:self.titleLabel];
        self.titleLabel.font  = [UIFont systemFontOfSize:12];
        
        self.myImageView.frame = CGRectMake(0, 0, WIDTH / 4.5, WIDTH / 4.5 * bili1);
        self.myImageView.layer.borderWidth = 1.5;
        self.myImageView.layer.cornerRadius = 10;
        self.myImageView.layer.borderColor = [UIColor clearColor].CGColor;
        self.myImageView.layer.masksToBounds = YES;
        
        self.deleteImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 20, 20)];
        [self.contentView addSubview:self.deleteImage];
        [self.deleteImage release];
        
        self.grade_aveLabel = [[UILabel alloc] initWithFrame:CGRectMake(30, WIDTH / 4.5 * bili1 + 40, WIDTH / 4.5, 15)];
        [self.contentView addSubview:self.grade_aveLabel];
        
        [_titleLabel release];
        [_grade_aveLabel release];
    }
    
    
    return self;
}

- (void)layoutSubviews{
    [super layoutSubviews];
}

- (void)dealloc
{
    [_grade_aveLabel release];
    [_titleLabel release];
    [super dealloc];
}

@end
